package com.zhuangjie.coupon.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhuangjie.coupon.dto.LockCouponsDTO;
import com.zhuangjie.coupon.entity.Coupon;
import com.zhuangjie.coupon.pojo.CouponCoreInfo;
import com.zhuangjie.coupon.vo.ApplicableShopCouponCoreInfoVO;
import com.zhuangjie.coupon.vo.ValidCouponCount;

import java.util.Collection;
import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zhuangjie
 * @since 2024-02-28
 */
public interface CouponService extends IService<Coupon> {
    Collection<CouponCoreInfo> queryMyPlatformCoupons(boolean isFold, Long userId, Long shopId) throws ExecutionException, InterruptedException;


    void expandCoupon(Long couponId);

    ValidCouponCount validCouponCount(Long userId);

    List<CouponCoreInfo> queryApplicableCouponsForShop(Long userId, Long shopId);

    List<CouponCoreInfo> queryReceivedPlatformCoupon(Long userId, Boolean isParticipatingInPlatformInflationCouponActivity);

    ApplicableShopCouponCoreInfoVO queryApplicableShopCouponCoreInfo(Long shopId, Boolean isParticipatingInPlatformInflationCouponActivity);

    List<CouponCoreInfo> queryAllAvailableShopCoupons(Long shopId) throws Exception;

    List<CouponCoreInfo> queryShopsDisplayInfo(Long shopId, List<Long> batchIds) throws Exception;

    void lockCoupons(LockCouponsDTO lockCouponsDTO);

    void unLockCoupons(LockCouponsDTO lockCouponsDTO);

}
